<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', function()
{
	return View::make('hello');
});
Route::get('/admin',function(){
    return View::make("backend.layouts.master");
});

Route::get('/index','ThongbaoController@trangchu');

Route::post('/dangnhap','NguoidungController@login');

Route::get('/dangxuat','NguoidungController@logout');

Route::any('/admin/content','ThongbaoController@index');
Route::get('/admin/content/delete/{id}','ThongbaoController@destroy');

Route::get('/admin/content/add','ThongbaoController@add');
Route::post('/admin/content/add','ThongbaoController@store');

Route::get('/admin/content/edit/{id}','ThongbaoController@edit');
Route::post('/admin/content/edit/{id}','ThongbaoController@update');

Route::get('/chitietthongbao/{id}','ThongbaoController@chitietthongbao');


Route::get('/tim','CongvanController@tim');
Route::post('/tim','CongvanController@timkiem');
